﻿using Model;
using SQLTool;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BLL
{
    public class BuildModel
    {
        public static List<Command> LoadCommandsList()
        {
            List<Command> commandList = new List<Command>();
            DataTable commdataTable = SQLOPT.ExecuteQuery("SELECT * FROM QuickCommand");
            foreach (DataRow row in commdataTable.Rows)
            {
                Command cmd = new Command
                {
                    CommandName = row["CommandName"].ToString(),
                    CommandContent = row["CommandContent"].ToString()
                };

                commandList.Add(cmd);
            }
            return commandList;
        }





    }
}





